home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4430 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: mail2news.demon.co.uk!hpl3sn03.cern.ch
  2. From: Dan Pop <danpop@mail.cern.ch>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: The size of a file
  5. Date: Sun, 4 Feb 1996 16:58:17 +0100
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <9602041558.AA18993@dxmint.cern.ch>
  8. References: <4ebc03$4gv@gate.compart.fi>,<11a7cc$142013.177@news.comet.net> <DM85t1.2rq@news.cern.ch>
  9. X-NNTP-Posting-Host: hpl3sn03.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11. X-Mail2News-Path: dxmint.cern.ch!hpl3sn03.cern.ch
  12.  
  13. loreti@mxsld2.pd.infn.it (Maurizio Loreti) writes:
  14.  
  15. >The %ld is correct for a long; a fpos_t should be casted to (unsigned
  16. >long) and printed as such.
  17.  
  18. Except that fpos_t may not be an arithmetic type at all and the cast will
  19. result in your code being rejected by the compiler.
  20.  
  21. fpos_t can be portably used only with the fgetpos and fsetpos functions.
  22.  
  23. The reason fpos_t and the related functions were introduced in the language
  24. is that a long may not be large enough to record the value of the file
  25. position indicator.
  26.  
  27. Dan
  28. -- 
  29. Dan Pop
  30. CERN, CN Division
  31. Email: danpop@mail.cern.ch 
  32. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  33.